import request from "@/utils/request";
export const service = () => {
  return !!JSON.parse(localStorage.$loginInfo).tenantId ? "/event" : "/ttevent";
};
export function getRecordByType(params) {
  return request({
    url: service() + `/alarm/order/getRecordByType`,
    method: "post",
    data: params,
  });
}

export function getOrderInfo(params) {
  return request({
    url: service() + `/alarm/order/getOrderInfo`,
    method: "post",
    data: params,
  });
}
//
export function getVideoPlaybackUrl(data) {
  return request({
    data,
    url: "/video/getVideoPlaybackUrl",
    method: "post",
  });
}
// /alarm/processorder/getProcessDetail/
export function getProcessDetail(data) {
  return request({
    url: service() + `/alarm/processorder/getProcessDetail`,
    method: "post",
    data,
  });
}
// /alarm/orderApprove/submitOrderApproveInfo
export function submitOrderApproveInfo(data) {
  return request({
    data,
    url: service() + `/alarm/orderApprove/submitOrderApproveInfo`,
    method: "post",
  });
}
export function signSubmitOrderApproveInfo(data) {
  return request({
    data,
    url: service() + `/alarm/orderApprove/signSubmitOrderApproveInfo  `,
    method: "post",
  });
}
// /alarm/processorder/rollBack
export function rollBack(data) {
  return request({
    data,
    url: service() + `/alarm/processorder/rollBack`,
    method: "post",
  });
}
export function getRecordByOrderIdAsc(data) {
  return request({
    data,
    url: `/event/alarm/order/getRecordByOrderIdAsc`,
    method: "post",
  });
}
